Release 10.1A: OpenEdge Data Management:
DataServer for ORACLE
Index cursors
The OpenEdge Index Cursor (
-c) connection parameter sets the maximum number of ORACLE cursors that the DataServer client session uses when you connect to an ORACLE database. Specify-cafter you specify the name of the ORACLE database (-dbdatabase-name) in the list of parameters.The DataServer uses cursors whenever it executes an SQL statement to access data in a table. Each ORACLE cursor uses up to 4K of memory. To minimize memory consumption, the DataServer attempts to free and reuse ORACLE cursors as soon as possible. It also reuses cursors that are active (not free) if there are no free cursors available. This might reduce performance, but it allows the application to continue even if there are not enough cursors. The Progress 4GL uses a least-recently-used algorithm to select which active cursor to reuse.
ORACLE allows you to set the maximum number of cursors in your
init.orafile using theOPEN_CURSORSparameter. The valid range for numbers of cursors varies depending on the version of ORACLE and system configuration.The Progress 4GL default maximum number of ORACLE open cursors for the DataServer is 50 also. When you use the
-cparameter to set the maximum number of cursors, you cannot exceed the number that yourinit.orafile specifies. For example, if the ORACLEOPEN_CURSORSparameter is set to 250, then you can set the upper limit for maximum open cursors open to 250 with the-cparameter.Determining the optimal number of cursors for your application involves balancing memory consumption, performance, and possible application failures. Use the
-Dsrvqt_debug,EXTENDEDparameter to log information on how many cursors your application uses. The following excerpt from thedataserv.lgfile shows the cursor handler identifier within the angle brackets (<n>) that the DataServer uses for each OCI call:
Avoid setting the
-cparameter too low or too high:
- Too low — A low setting can cause unnecessary recompiles of SQL, which hurts performance. Your application could also fail because it opens more queries, nested
FOREACH, orFINDstatements, that reference different indexes, than the-cparameter allows.- Too high — A high setting can cause unnecessary consumption of resources such as memory and cursors, which can hurt performance when they are not reused. Your application can also fail when you allocate all available cursors, including a cursor that the ORACLE DBMS needs for internal purposes. If this occurs, ORACLE returns a recursive SQL error.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |